<template>
	<view class="main">
		<u-navbar back-text="" slot="center" :autoBack="true" safeAreaInsetTop placeholder>
			<view slot="center" class="leftText">帮助与反馈</view>
		</u-navbar>
		<view class="form">
			<u--form
				labelPosition="left"
				:model="model1"
				ref="form1">
				<u-form-item fontSize="12" borderBottom>
					<u--input
						v-model="formData.title" 
						fontSize="14" 
						disabledColor="#0F0F0F" 
						inputAlign="left"  
						
						border="none" 
						placeholder="请输入反馈标题"></u--input>
				</u-form-item>
				<u--textarea v-model="formData.content" height="180" maxlength="400"
				placeholder="请输入您要反馈的内容" 
				count border="none"></u--textarea>
			</u--form>
			
		</view>
		<view class="submit"><u-button type="primary" @click="sendPost()" text="确定"></u-button></view>
	</view>
</template>

<script>
import Index from '@/common/index-model.js'
let index=new Index();
let that = null;
export default {
	data() {
		return {
			notice:'',
			myCard:{},
			str:{},//上个页面传过来的值
			types:0,//类型
			formData:{
				title:'',
				content:'',
			}
		}
	},
	components: {

	},
	onLoad() {
		
	},
	methods:{
		sendPost(){
			if(!this.formData.title){
				index.show_tips('请输入反馈标题')
				return
			}
			if(!this.formData.content){
				index.show_tips('请输入反馈内容')
				return
			}

			index.getPublicUserMember(this.formData,'/client/public/add/feedback','post',res=>{
				if(res.data.code == 200 && res.data.success){
					index.show_tips('操作成功')
					setTimeout(()=>{
						index.navigate_back(1)
					},500)
				}else{
					index.show_tips(res.data.message);
					return false
				}
			})
		},
	}
}	
</script>

<style>
@import url("@/static/css/publics.css");
page{
	background: #F3F3F3;
}
.form{ padding: 20rpx; background: #fff; margin-bottom: 80rpx;}
.submit{ padding: 20rpx;}
.u-textarea{ padding: 9px 0px!important;}
.u-textarea__field{
    flex: 1;
    font-size: 28rpx!important;
    color: #606266;
    width: 100%;
}
/deep/.input-placeholder{ color: #f00;}
</style>